
<?php
require 'db.php';
if(isset($_POST['masv']))$masv=$_POST['masv'];
$sqldk="SELECT dbo_monhoc.MaMH, TenMH, dbo_noidung.MaNhom FROM dbo_monhoc, dbo_noidung, dbo_dondangky";
$sqldk.=" WHERE dbo_noidung.MaNhom=dbo_dondangky.MaNhom and dbo_noidung.MaMH=dbo_monhoc.MaMH and MaSV=:masv ";
$stmt = $db->prepare($sqldk);
$stmt->bindParam(":masv",$masv,PDO::PARAM_STR);
$stmt->execute();

?>
<hr ></hr>

<table  class="table table-bordered table-hover" style="font-size: 13px;">
	
			<thead>
			<tr class="info"><th>STT</th><th>Mã học phần</th><th>Tên học phần</th><th>Điều kiện</th><th>Nhóm</th><th>Tín chỉ</th><th>Điểm chữ</th><th>Tích lũy</th></tr></thead>
			<tbody>
	<?php $i=1;
	
		if($stmt->execute()){
			
				while($r=$stmt->fetch()){
?>
				
				<tr>
					<td><?php echo $i++;?></td>
					<td><?php echo $r['MaMH'];?></td>
					<td><?php echo $r['TenMH'];?></td>
					<td><?php echo $r['MaNhom'];?></td>
				</tr>
		<?php }} ?>	
			</tbody>
			</table>